{% extends "base.html" %}
{% block content %}
<div class="card ">
    <div class="card-header">Pending Tasks{% if count %}: {{count}} {% endif %}</div>
    {% if tasks %}
    <table class="table table-striped" style="table-layout: fixed;">
        <thead>
        <tr>
            <th width="5%">ID</th>
            <th width="14%">Timestamp (added on)</th>
            <th width="6%">Category</th>
            <th width="35%">Target</th>
            <th width="30%">MD5/SHA256</th>
            <th width="5%">Action</th>
        </tr>
        </thead>
        <tbody>
        {% for task in tasks %}
            <tr>
                <td>{{task.id}}</td>
                <td><span class="muted">{{task.added_on}}</span></td>
                <td>{{task.category}}</td>
                <td>{{task.target|filename}}</td>
                <td>{{task.md5}}</br>{{task.sha256}}</td>
                <td><a href="/apiv2/tasks/delete/{{task.id}}/pending"><i class="fas fa-trash-alt"></i></a></td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    {% else %}
    <div class="card-body">No pending tasks.</div>
    {% endif %}
        </div>
{% endblock %}
